<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript" src="../js/jquery.min.js"></script>
    <!-- 引入bootstarp -->
    <script type="text/javascript" src="../js/bootstrap3/js/bootstrap.js"></script>
    <link rel="stylesheet" href="../js/bootstrap3/css/bootstrap.css">
    <!-- 引入bootstrap table的css、js -->
    <link type="text/css" rel="stylesheet" href="../js/bootstrap-table/bootstrap-table.css">
    <script type="text/javascript" src="../js/bootstrap-table/bootstrap-table.js"></script>
    <script type="text/javascript" src="../js/bootstrap-table/locale/bootstrap-table-zh-CN.js"></script>
    <!-- 引入bootstrap datetime的css、js -->
    <link type="text/css" rel="stylesheet" href="../js/bootstrap-datetimepicker/css/bootstrap-datetimepicker.css">
    <script type="text/javascript" src="../js/bootstrap-datetimepicker/js/bootstrap-datetimepicker.js"></script>
    <script type="text/javascript" src="../js/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js"></script>
</head>
<body>
<div id="toolbar">
</div>
<div class="table" id="bookTable"></div>

</body>
<script>
    $(function(){
        initBookTable();
    })

    function initBookTable(){
        $("#bookTable").bootstrapTable({
            toolbar:'#toolbar',
            url:'../wjs/findmogodb',
         /*   method:'post',
            contentType:'application/x-www-form-urlencoded',//post请求按照表单方式
            pagination:true,*/
            pageSize:1,
            pageList:[1],
            pageNumber:1,
            clickToSelect: true,         //是否启用点击选中行
            sidePagination:'server',        //分页方式：client客户端分页，server服务端分页
            striped:true,          //斑马线
            queryParams:function(){
                return {
                    page:this.pageNumber,
                    rows:this.pageSize
                };
            },
            columns:[
                {field:'xx',title:'我的足迹',width : 1000,height:600,formatter:function (value,row,index){
                    var a="<img src='"+row.productImg+"' width='100' height='90'>";
                        a+="<a onclick='tiaoZhuanXiangQiang("+row.id+")'>"+"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;物品名称:"+row.productName+",</a>";
                        a+="<a >"+"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;物品单价:"+row.productPrice+",</a>";
                        a+="<a >"+"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;物品颜色:"+row.productColor+"</a>";
                        return a;
                    }},

               {field:'productDeliveryTime',title:'浏览时间'}
            ]
        })
    }
    $('.date').datetimepicker({
        language: 'zh-CN',//显示中文
        format: 'yyyy-mm-dd hh:ii:ss',//显示格式
        minView: "month",//设置只显示到月份
        initialDate: new Date(),//初始化当前日期
        autoclose: true,//选中自动关闭
        todayBtn: true//显示今日按钮
    });

    function tiaoZhuanXiangQiang(id) {
        sessionStorage.setItem("productId",id);
        location.href="../page/goumai";
    }
</script>
</html>